import request from "@/utils/request";

const BaseUrl = '/api/order'


// 询价单分页查询
export function quotationPage(data: any){
    return request({
        url: BaseUrl +  '/quotation/page',
        method: 'post',
        data:data,
    })
}


// 获取询价单信息 根据订单号
export function orderGetByOrderNUmber(orderNumber: any){
    return request({
        url: BaseUrl +  '/getByNumber',
        method: 'get',
        params:{
            orderNumber: orderNumber,
        },
    })
}

// 获取状态信息
export function orderGetOrderStatusMap(orderNumber: any){
    return request({
        url: BaseUrl +  '/status/map/get',
        method: 'get',
        params:{
            orderNumber: orderNumber,
        },
    })
}


// 根据订单号修改订单信息
export function quotationStatusUpdate(orderNumber: any,code: number){
    return request({
        url: BaseUrl +  '/status/update',
        method: 'put',
        params:{
            orderNumber: orderNumber,
            code: code,
        },
    })
}

// 向询价单添加审核意见
export function quotationAuditOpinion(orderNumber: any,opinion: string){
    return request({
        url: BaseUrl +  '/opinion',
        method: 'put',
        params:{
            orderNumber: orderNumber,
            opinion: opinion,
        },
    })
}
